{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# 折线图\n",
    "from pyecharts.charts import Line\n",
    "from pyecharts.faker import Faker\n",
    "from pyecharts import options as opt"
   ],
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "line = Line()\n",
    "line.add_xaxis(Faker.cars)\n",
    "line.add_yaxis('商家A', Faker.values())\n",
    "line.add_yaxis('商家B', Faker.values())\n",
    "line.add_yaxis('商家C', Faker.values())"
   ],
   "id": "1a880234aa17dd9",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": "line.render_notebook()",
   "id": "9f209d22a1b3e4f5",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "# 系列配置项\n",
    "line = Line()\n",
    "line.add_xaxis(Faker.cars)\n",
    "line.add_yaxis('商家A', Faker.values())\n",
    "line.add_yaxis('商家B', Faker.values())\n",
    "line.add_yaxis('商家C', Faker.values())\n",
    "line.set_series_opts(\n",
    "    linestyle_opts=opt.LineStyleOpts(\n",
    "        type_= \"solid\",  # 线条类型 dashed  solid  dotted\n",
    "        width= 2\n",
    "    )\n",
    ")\n",
    "line.render_notebook()"
   ],
   "id": "159032478ae36de4",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": "",
   "id": "f909456f019543cb",
   "outputs": [],
   "execution_count": null
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
